# from datetime import date,timedelta
# print(date.strftime(date.today()-timedelta(days=1),'%Y%m%d'))
# print(date.today().month,date.today().day)
##########++++++++++++++++++
# import json
# orderDict={
# }
# with open('orderDict,json','w',encoding='utf8') as f:
#     json.dump(orderDict,f)
 ##########++++++++++++++++++
# from winsound import Beep
# Beep(200,200)



import threading
import time

# 斐波那契数列函数
def fibonacci(n):
    fib_seq = [0, 1]
    while len(fib_seq) < n:
        fib_seq.append(fib_seq[-1] + fib_seq[-2])
    return fib_seq

# 线程打印函数
def print_fibonacci(fib_seq, thread_num):
    for i in range(len(fib_seq)-1):
        if thread_num == 1:
            print(fib_seq[i])
        else:
            print(fib_seq[i+1])
        time.sleep(1)

# 创建线程
thread1 = threading.Thread(target=print_fibonacci, args=(fibonacci(20), 1))
thread2 = threading.Thread(target=print_fibonacci, args=(fibonacci(20), 2))

# 启动线程
thread1.start()
thread2.start()

# 等待线程结束
thread1.join()
thread2.join()